#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>

typedef int SLTDateType;

typedef struct ListNode {
    int val;
    struct ListNode* next;
}ListNode;
ListNode* SListInit()
{
    ListNode* list1 = (ListNode*)malloc(sizeof(ListNode));
    ListNode* list2 = (ListNode*)malloc(sizeof(ListNode));
    ListNode* list3 = (ListNode*)malloc(sizeof(ListNode));
    ListNode* list4 = (ListNode*)malloc(sizeof(ListNode));
    ListNode* list5 = (ListNode*)malloc(sizeof(ListNode));
    list1->val = 1;
    list2->val = 2;
    list3->val = 3;
    list4->val = 4;
    list5->val = 5;

    list1->next = list2;
    list2->next = list3;
    list3->next = list4;
    list4->next = list5;
    list5->next = list3;
    return list1;
}

SListPrint(ListNode* phead)
{
    ListNode* cur = phead;
    while (cur != NULL)
    {
        printf("%d->", cur->val);
        cur = cur->next;
    }
    printf("NULL\n");
}
